<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>xiaochenchen</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="__admin__/style/bootstrap.css" rel="stylesheet">
    <link href="__admin__/style/font-awesome.css" rel="stylesheet">
    <link href="style/weather-icons.css" rel="stylesheet">

    <!--Beyond styles-->
    <link id="beyond-link" href="__admin__/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="__admin__/style/demo.css" rel="stylesheet">
    <link href="__admin__/style/typicons.css" rel="stylesheet">
    <link href="__admin__/style/animate.css" rel="stylesheet">

</head>

<body>
<!-- 头部 -->
{include file='common/top'}
<!-- /头部 -->

<div class="main-container container-fluid">
    <div class="page-container">
        <!-- Page Sidebar左侧 -->
        {include file='common/left'}
        <!-- /Page Sidebar -->
        <!-- Page Content -->
        <div class="page-content">
            <!-- Page Breadcrumb -->
            <div class="page-breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <a href="{:url('Index/index')}">系统</a>
                    </li>
                    <li>
                        <a href="{:url('Category/lst')}">商品分类管理</a>
                    </li>
                    <li class="active">商品修改分类</li>
                </ul>
            </div>
            <!-- /Page Breadcrumb -->

            <!-- Page Body -->
            <div class="page-body">

                <div class="row">
                    <div class="col-lg-12 col-sm-12 col-xs-12">
                        <div class="widget">
                            <div class="widget-header bordered-bottom bordered-blue">
                                <span class="widget-caption">修改分类</span>
                            </div>
                            <div class="widget-body">
                                <div id="horizontal-form">
                                    <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
                                        <!--   enctype意思是可以上传图片-->

                                        <!-- 隐藏域 分配ID 给到 后面edit分方法获取这id -->
                                        <input type="hidden" name="id" value="{$Categorys.id}" >
                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">上级分类</label>
                                            <div class="col-sm-6">

                                                <select class="form-control" name="pid">
                                                    <option  value="0">顶级分类</option>
                                                    {volist name='CategoryRes' id='cate'}
<!--                                                    如果当前栏目的pid 等于我们现在 正在循环的某一个id的话那么就是我们当前栏目的上级栏目   selected="selected"选定-->
                                                    <option  {if condition="$Categorys['pid'] eq $cate['id'] "}  selected="selected" {/if}   value="{$cate.id}">
                                                        <?php echo str_repeat('--',  $cate['level']*6)?>{$cate.cate_name}</option>
                                                    {/volist}
                                                </select>

                                            </div>
                                            <p class="help-block col-sm-4 red">* 必填</p>
                                        </div>

                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">商品分类名称
                                            </label>
                                            <div class="col-sm-6">
                                                <input class="form-control" id="cate_name" name="cate_name" value="{$Categorys.cate_name}" required="" type="text">
                                            </div>
                                            <p class="help-block col-sm-4 red">* 必填</p>
                                        </div>

                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">icon图标</label>
                                            <div class="col-sm-6">
                                                <input class="form-control"  value="{$Categorys.iconfont}" placeholder="" name="iconfont"  type="text" />
                                            </div>
                                            <p class="help-block col-sm-4 red">* 必填</p>
                                        </div>



                                        <div class="form-group">
                                            <label for="username"
                                                   class="col-sm-2 control-label no-padding-right">显示到导航</label>
                                            <div class="col-sm-6">
                                                <div class="radio" style="float:left; padding-right:12px;">
                                                    <label>
                                                        <input name="show_cate" value="1" {if condition="$Categorys['show_cate'] eq 1 "}  checked="checked" {/if} type="radio" class="inverted" >
                                                        <span class="text">是 </span>
                                                    </label>
                                                </div>
                                                <div class="radio" style="float:left; padding-right:12px;">
                                                    <label>
                                                        <input name="show_cate" value="0" {if condition="$Categorys['show_cate'] eq 0"}  checked="checked" {/if}  type="radio" class="inverted" >
                                                        <span class="text">否 </span>
                                                    </label>
                                                </div>
                                            </div>
                                        </div>


                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">
                                                推荐位
                                            </label>
                                            <div class="col-sm-6">
                                                <div class="checkbox">
                                                    {volist name="goodsRecposRes" id="recpos"}
                                                    <label style="margin-left: 10px">
                                                        <?php if(in_array($recpos['id'],$myGoodsRecposRes)){
                                                                                $checked='checked="checked"';
                                                                                } else{
                                                                                $checked='';
                                                                                }?>
                                                        <input <?php echo $checked?> type="checkbox" name="recpos[]" class="inverted" value="{$recpos.id}" >
                                                        <span class="text">{$recpos.rec_name}</span>
                                                    </label>
                                                    {/volist}
                                                </div>
                                            </div>
                                            <p class="help-block col-sm-4 red">* 必填</p>
                                        </div>

                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">缩略图</label>
                                            <div class="col-sm-6">
                                                <input   placeholder="" name="cate_img" type="file">
                                                {if condition="$Categorys['cate_img']"}
                                                <img src="__UPADMIN__/{$Categorys.cate_img}" height="70px">
                                                {else /}
                                                暂无图片
                                                {/if}
                                            </div>

                                        </div>




                                        <div class="form-group">
                                            <label for="username"
                                                   class="col-sm-2 control-label no-padding-right">关键词</label>
                                            <div class="col-sm-6">
                                                    <textarea class="form-control" name="keywords">
                                                       {$Categorys.keywords}
                                                    </textarea>
                                            </div>
                                        </div>



                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">描述</label>
                                            <div class="col-sm-6">
                                                    <textarea class="form-control" name="description">
                                                        {$Categorys.description}
                                                    </textarea>
                                            </div>
                                        </div>





                                        <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <button type="submit" class="btn btn-default">保存信息</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
    </div>
</div>

<!--Basic Scripts-->
<script src="__admin__/style/jquery_002.js"></script>
<script src="__admin__/style/bootstrap.js"></script>
<script src="__admin__/style/jquery.js"></script>
<!--Beyond Scripts-->
<script src="__admin__/style/beyond.js"></script>



</body>

</html>